WOLF core
WOLF: A Modular Estimation Framework for Robotics
XXXXXXXXXXXXXXXXXXXXXXXXvoid(0)" frameborder="0" name="MSearchResults" id="MSearchResults">
wolf::Prior Class Reference

Prior of a state: 'initial_guess' (only the initial value), 'fix' (fixed) or 'factor' (absolute factor) More...

#include <core/composite/prior_composite.h>

Public Member Functions

 Prior ()=default
 Default constructor. More...
 
 Prior (const std::string &_prior_mode, const Eigen::VectorXd &_factor_std=Eigen::VectorXd(0))
 Constructor from the mode and the factor noise std. More...
 
 Prior (const YAML::Node &_n)
 Constructor from a YAML node with 'mode' (and 'factor_std' if mode is 'factor') More...
 
virtual ~Prior ()=default
 Destructor. More...
 
const std::string & getPriorMode () const
 Returns the prior mode. More...
 
const Eigen::VectorXd & getFactorStd () const
 Returns the factor noise std. More...
 
bool isInitialGuess () const
 Returns whether the mode is 'initial_guess'. More...
 
bool isFixed () const
 Returns whether the mode is 'fix'. More...
 
bool isFactor () const
 Returns whether the mode is 'factor'. More...
 
virtual void check () const
 Checks the prior mode. Throws if not valid. More...
 
YAML::Node toYaml () const
 Returns a YAML node with the mode (and factor_std) More...
 

Protected Attributes

std::string prior_mode_
 Prior mode: 'initial_guess', 'fix' or 'factor'. More...
 
Eigen::VectorXd factor_std_
 Factor noise std (only if mode is 'factor') More...
 

Friends

std::ostream & operator<< (std::ostream &_os, const wolf::Prior &_x)
 Prints the prior to a stream. More...
 

Detailed Description

Prior of a state: 'initial_guess' (only the initial value), 'fix' (fixed) or 'factor' (absolute factor)

Constructor & Destructor Documentation

◆ Prior() [1/3]

wolf::Prior::Prior ( )
default

Default constructor.

◆ Prior() [2/3]

wolf::Prior::Prior ( const std::string &  _prior_mode,
const Eigen::VectorXd &  _factor_std = Eigen::VectorXd(0) 
)

Constructor from the mode and the factor noise std.

◆ Prior() [3/3]

wolf::Prior::Prior ( const YAML::Node &  _n)

Constructor from a YAML node with 'mode' (and 'factor_std' if mode is 'factor')

◆ ~Prior()

virtual wolf::Prior::~Prior ( )
virtualdefault

Destructor.

Member Function Documentation

◆ check()

void wolf::Prior::check ( ) const
virtual

Checks the prior mode. Throws if not valid.

◆ getFactorStd()

const Eigen::VectorXd & wolf::Prior::getFactorStd ( ) const
inline

Returns the factor noise std.

◆ getPriorMode()

const std::string & wolf::Prior::getPriorMode ( ) const
inline

Returns the prior mode.

◆ isFactor()

bool wolf::Prior::isFactor ( ) const
inline

Returns whether the mode is 'factor'.

◆ isFixed()

bool wolf::Prior::isFixed ( ) const
inline

Returns whether the mode is 'fix'.

◆ isInitialGuess()

bool wolf::Prior::isInitialGuess ( ) const
inline

Returns whether the mode is 'initial_guess'.

◆ toYaml()

YAML::Node wolf::Prior::toYaml ( ) const

Returns a YAML node with the mode (and factor_std)

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  _os,
const wolf::Prior &  _x 
)
friend

Prints the prior to a stream.

Member Data Documentation

◆ factor_std_

Eigen::VectorXd wolf::Prior::factor_std_
protected

Factor noise std (only if mode is 'factor')

◆ prior_mode_

std::string wolf::Prior::prior_mode_
protected

Prior mode: 'initial_guess', 'fix' or 'factor'.


The documentation for this class was generated from the following files: